package com.design.pattern.creator.singleton.lazy;

/**
 * 优点：节省内存
 * 缺点：线程不安全。
 */
public class LazySimpleSingleton {
    private static LazySimpleSingleton instance;

    private LazySimpleSingleton(){}

    public static LazySimpleSingleton getInstance(){
        if(instance == null) {
            instance = new LazySimpleSingleton();
        }
        return instance;
    }
}
